import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ComponentFactoryResolver } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import { RouterModule, Router } from "@angular/router";
import { FormBuilder, ReactiveFormsModule, FormsModule } from "@angular/forms";
import { NgZorroAntdModule, NZ_MESSAGE_CONFIG, NzMessageService, NzNotificationService, NzModalService } from 'ng-zorro-antd';
import { AppRoutingModule } from "./app-routing.module";
import { SystemModule } from './system/system.module';
import { SystemIndexModule } from "./system-index/system-index.module";
import { AppComponent } from './app.component';
import { HttpService, InterceptorService, AuthService, AuthGuard, CnBooleanPipe } from ".";
import { NgZorroPageBaseComponent } from './core/ng-zorro-page-base-component/ng-zorro-page-base-component.component';
import { SharedModule } from './core/share.module';
import { FormValidatorService } from './core/service/form-validator.service';
import { GameHallIndexComponent } from './game-hall/game-hall-index/game-hall-index.component';
import { SignalRService } from "./core/service/singnalr-service";
import { NZ_I18N, zh_CN } from 'ng-zorro-antd';
import { NgxEchartsModule } from 'ngx-echarts';


/** 注册语言包 **/
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { DrillFormService } from './core/service/drill-form.service';
import { ScoreClassComponent } from './teacher-client/score-manager-index/score-class/score-class.component';
import { ScoreManagerComponent } from './teacher-client/score-manager-index/score-manager/score-manager.component';
import { ScoreManagerIndexComponent } from './teacher-client/score-manager-index/score-manager-index.component';
import { StudentScoreListComponent } from './teacher-client/score-manager-index/student-score-list/student-score-list.component';
import { ClassScoreSetComponent } from './teacher-client/score-manager-index/class-score-set/class-score-set.component';
import { StudentScoreSetComponent } from './teacher-client/score-manager-index/student-score-set/student-score-set.component';
import { DrillTableContentComponent } from './super-admin-client/drill-table-content/drill-table-content.component';
import { RoleTemplateComponent } from './super-admin-client/role-template/role-template.component';
import { DrillDragContentComponent } from './system/student-drill/drill-drag-content/drill-drag-content.component';
import { StudentJoinClassRequestComponent } from './teacher-client/student-join-class-request/student-join-class-request.component';
import { StudentGroupDrillScoreComponent } from './teacher-client/score-manager-index/student-group-drill-score/student-group-drill-score.component';

registerLocaleData(zh);

@NgModule({

  declarations: [

    AppComponent,
    NgZorroPageBaseComponent,
    ScoreClassComponent,
    ScoreManagerComponent,
    ScoreManagerIndexComponent,
    ClassScoreSetComponent,
    StudentScoreListComponent,
    StudentScoreSetComponent,
    DrillTableContentComponent,
    RoleTemplateComponent,
    DrillDragContentComponent,
    StudentJoinClassRequestComponent,
    StudentGroupDrillScoreComponent
  ],
  imports: [

    SharedModule,
    BrowserAnimationsModule,
    BrowserModule,
    HttpClientModule,
    ReactiveFormsModule,
    FormsModule,
    NgZorroAntdModule.forRoot(),
    SystemModule,
    SystemIndexModule,
    AppRoutingModule,
    NgxEchartsModule
  ],
  providers: [
    // NzMessageService,
    // NzNotificationService,
    // NzModalService,
    HttpService,
    { provide: HTTP_INTERCEPTORS, useClass: InterceptorService, multi: true },
    { provide: NZ_MESSAGE_CONFIG, useValue: { nzDuration: 3000 } },
    { provide: NZ_I18N, useValue: zh_CN },
    AuthService,
    AuthGuard,
    FormBuilder,
    FormValidatorService,
    CnBooleanPipe,
    SignalRService,
    DrillFormService,
  ],
  bootstrap: [AppComponent]
})
export class AppModule {

}
